package com.example.databindingdemo;

import com.example.databindingdemo.model.Book;

import java.util.ArrayList;
import java.util.List;

/**
 * @author: tuyrt7 on 2020/9/8.
 */
public class RecyclerViewViewModel {

    public List<Book> getBooks() {
        List<Book> books = new ArrayList<>();
        for (int i = 0; i < 100; i++) {
            Book book = new Book("android第一行代码"+i, "郭霖"+i);
            book.image = "https://bkimg.cdn.bcebos.com/pic/5d6034a85edf8db159184a7a0023dd54564e74fd?x-bce-process=image/" +
                    "resize,m_lfit,w_268,limit_1/format,f_jpg";
            books.add(book);
        }
        return books;
    }
}
